<?php
namespace Admin\Model;
use Think\Model;
class MessageModel extends Model{
		public function pages(){
			$count = $this-> count();
			$Page  = new \Think\Page($count,2);
			$show  = $Page -> show(); 
			$list = $this->order('id desc')->limit($Page->firstRow.','.$Page->listRows)->select();
			return array(
				'page' => $show,
				'list' => $list,
				);
		}
		public function edit($id){

			$m=$this -> where(array('id'=>$id))->find();
			$this->where(array('id'=> $id))->data(array('is'=>1))->save();
			return $m;
		}
	}
?>